{extend name='admin@index/index'}

{block name='style'}
<style>
    a.news-image {
        width: 119px;
        height: 98px;
        cursor: pointer;
        margin: 10px 0 0 10px;
        display: inline-block;
        background-size: cover;
        background-position: center center;
        border: 1px solid rgba(125, 125, 125, 0.3)
    }

    a.news-image:hover {
        box-shadow: 0 0 10px 0 green;
    }

    .pagination-container {
        text-align: center;
    }

    .pagination-container > span {
        display: none !important;
    }

    .pagination-container > ul {
        float: none
    }

    .page-style {
        bottom: 0;
        width: 100%;
        height: 50px;
        padding: 0 10px;
        position: fixed;
        background: #fff
    }

    .page-style .pagination {
        padding-right: 20px;
    }
</style>
{/block}

{block name="body"}
<div class="layui-clear">
    {foreach $list as $key=>$vo}
    <a class="news-image transition" data-src='{$vo.local_url}' style="background-image:url('{$vo.local_url}')"></a>
    {/foreach}
</div>
<div class="page-style">{if isset($pagehtml)}{$pagehtml|raw}{/if}</div>
{/block}

{block name="script"}
<script>
    $('body').off('click', '[data-open]').on('click', '[data-open]', function () {
        window.location.href = this.getAttribute('data-open');
    }).on('click', '.news-image', function () {
        let src = this.getAttribute('data-src');
        top.$('[name="{$field}"]').val(src).trigger('change');
        parent.layer.close(parent.layer.getFrameIndex(window.name));
    });
</script>
{/block}
